package comhw1029;

public class Test {
    public static void main(String[] args) {
        Book book1 = new Book(1,"java",33.45,50);
        Book book2 = new Book(2,"jsp",55.45,150);
        Book book3 = new Book(3,"ssm",77.45,250);
        Book[] books = {book1, book2, book3};
        Item item = new Item();
        Order order = new Order();
        Item[] items;
        items = order.makeOrder(item,books);
        order.printOrderID();
        double totalMoney = order.countTotal(items);
        System.out.println("订单总额为:"+totalMoney);
        for (int i = 0; i < items.length; i++){
            System.out.println(items[i].getBook().getName()+"----"+
                    items[i].getBook().getPrice()+"----"+
                    items[i].getQuantity());
        }
    }
}
